package com.gillion.grape.fros.ui.wizards;

import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;

public class NewWEFProjectWizard extends Wizard implements INewWizard{
	private NewWEFPage newWEFPage;
	public NewWEFProjectWizard(){
		newWEFPage = new NewWEFPage();
		addPage(newWEFPage);
	}

	@Override
	public void init(IWorkbench workbench, IStructuredSelection selection) {
		
	}

	@Override
	public boolean performFinish() {
		String projectName = newWEFPage.getProjectName();
		String nameSpace = newWEFPage.getNameSpace();
		String dbName = newWEFPage.getDbName();
		String url = newWEFPage.getUrl();
		String userName = newWEFPage.getUserName();
		String password = newWEFPage.getPassword();
		String driverClass = newWEFPage.getDriverClass();
		NewWEFProject newWEFPage = new NewWEFProject(projectName,nameSpace,dbName,url,userName,password,driverClass);
		newWEFPage.newProject();
		return true;
	}

}
